//
//  NSDate+Extension.m
//  DSJY
//
//  Created by 冯华强 on 16/9/28.
//  Copyright © 2016年 dsjy. All rights reserved.
//

#import "NSDate+Extension.h"

@implementation NSDate (Extension)

//根据秒返回时分秒
+ (NSString *)hmsForSecond:(NSInteger)second
{
    NSInteger hour = 0, minute = 0, s = 0;
    hour = second / 3600;
    minute = (second % 3600) / 60;
    s = second % 60;
    return [NSString stringWithFormat:@"%ld小时 %0.2ld分钟 %0.2ld秒", (long)hour, (long)minute, (long)s];
}

@end
